#pragma once
#include <iostream>
#include <functional>
#include <unistd.h>
#include <string>
#include <cstring>
#include <sys/socket.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <memory>

enum exit_code
{
    OK = 0,
    BIND_ERROR,
    SOCKET_ERROR,
    LISTEN_ERROR,
    USAGE_ERROR,
    CONNECT_ERROR,
    ACCEPT_ERROR,
    FORK_ERROR
};

class Nocopy
{
public:
    Nocopy(){}
    ~Nocopy(){}
    Nocopy(const Nocopy&) = delete;
    const Nocopy operator = (const Nocopy&) = delete;
};

#define CONV(addr) ((struct sockaddr*)addr)